package com.lhl.student.controller;
/**
 * ��������
 */
import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lhl.student.service.StudentService;
@Controller
@RequestMapping("/student")
public class StudentController {
	@Autowired
	private StudentService studentService;
	//学生登陆
	@RequestMapping("/login")
	public String login(HttpServletRequest request){
		boolean result=studentService.login(request);
		if(result==true){
			return "/student/success";
		}else{
			return "/student/fial";
		}
	}
	
	//学生注册
	@RequestMapping("register")
	public String register(HttpServletRequest registerRequest){
		boolean result=studentService.register(registerRequest);
		if(result==true){
			return "/student/success";
		}else{
			return "/student/fial";
		}
	}
	
}
